package com.pug.feign;

import com.pug.handler.FeignLoggerConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "xq-product-service",
        fallback = ProductServiceFeignFallback.class,
        configuration = FeignLoggerConfiguration.class)
public interface ProductServiceFeign {

    @PostMapping("/deduct/{productId}/{count}")
    boolean deduct(@PathVariable("productId") Long productId, @PathVariable("count") Integer count);
}
